String getConfigData(String data) {
  return data.substring(data.indexOf("M48")+4, data.indexOf("%", 2));
}
String getJobData(String data) {
  return data.substring(data.indexOf("%", 2)+1, data.indexOf("M30"));
}
int getUnitSystem(String cData) {
  if (cData.indexOf("M72") != -1) {
    return IMPERIAL;
  }
  else if (cData.indexOf("M71") != -1) {
    return METRIC;
  }
  else return -1;
}

int getToolIndex(){
  return 0;
}

String validateFile(String[] idataArray){
  String data = join(idataArray, "\n");
  trim(data);
  data = data.toUpperCase();
  while(data.indexOf("\n\n") != -1){
    data= join(split(data,"\n\n"),"\n");
  }
  return data;
}





